﻿using System.ComponentModel.DataAnnotations;
using System.Web.Mvc;
using Sharp.Portal;
using Sharp.Portal.AdminLTE;
using Sharp.Portal.Mvc;
using Sharp.Portal.Mvc.Form;

namespace Sharp.WebBooter.Areas.Demo.Models
{
    public partial class TroubleshootingModel : ISharpForm
    {
        public TroubleshootingModel()
        {
            UI = new BSSharpFrom(this);
            Confirmation = new ConfirmationInfo();
            Rectification = new RectificationInfo();
            Acceptance = new AcceptanceInfo();
            WriteOff = new WriteOffInfo();
        }

        [HiddenInput]
        public int Id { get; set; }

   
        /// <summary>
        /// 任务类别
        /// </summary>
        [Display(Name = "任务类别"), MasterData("TaskCategory")]
        public string TaskCategoryCode { get; set; }

        /// <summary>
        /// 隐患级别
        /// </summary>
        [Display(Name = "隐患级别"), MasterData("Dangerlevel")]
        public string DangerlevelCode { get; set; }
        /// <summary>
        /// 排查人
        /// </summary>
        [Display(Name = "排查人"), CustomField(FieldType.SelectBox, "/Platform/Employee/EmployeeDialog/", DisplayField = "", ValueField = nameof(InvestigatorsId))]
        public string Investigators { get; set; }
        public int InvestigatorsId { get; set; }

        /// <summary>
        /// 排查时间
        /// </summary>
        [Display(Name = "排查时间"), DataType(DataType.Date)]
        public string InvestigationTime { get; set; }


        /// <summary>
        /// 隐患分类
        /// </summary>
        [Display(Name = "隐患分类"), MasterData("DangerCategory")]
        public string DangerCategoryCode { get; set; }

        /// <summary>
        /// 隐患描述
        /// </summary>
        [Display(Name = "隐患描述"), DataType(DataType.MultilineText)]
        public string DangerDescribe { get; set; }

        /// <summary>
        /// 现场图片
        /// </summary>
        [Display(Name = "现场图片"), DataType(DataType.Upload)]
        public string ScenePicture { get; set; }

        /// <summary>
        /// 位置信息
        /// </summary>
        [Display(Name = "位置信息")]
        public string PositionInfor { get; set; }


        [Section("确认")]
        public ConfirmationInfo Confirmation { get; set; }


        [Section("整改")]
        public RectificationInfo Rectification { get; set; }


        [Section("验收")]
        public AcceptanceInfo Acceptance { get; set; }


        [Section("销账")]
        public WriteOffInfo WriteOff { get; set; }



        public SharpFrom UI { get; set; }
    }
}